From 26852dd18a9eb5fb036457436256469bfe59bf4e Mon Sep 17 00:00:00 2001 From: Stuart Prescott Date: Sun, 2 Mar 2025 12:02:45 +1100 Subject: [PATCH] Tidy test control generation code --- debian/tests/control.gen | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/tests/control.gen b/debian/tests/control.gen index 06c3d7f6..1fe1d37b 100755 --- a/debian/tests/control.gen +++ b/debian/tests/control.gen @@ -1,7 +1,9 @@ #!/bin/sh +C=debian/tests/control + # Remove debian/tests/control -rm -f debian/tests/control +rm -f $C # Create the basic (import) test for Python 3 modules for binary_package in $(dh_listpackages|grep "python3-pyside6.qt"); do @@ -13,12 +15,12 @@ Depends: python3, $binary_package, Restrictions: allow-stderr, superficial -Features: test-name=$binary_package" >>debian/tests/control +Features: test-name=$binary_package" >> $C architecture=$(sed -n "/^Package: ${binary_package}$/{n; p}" debian/control) if [ "$architecture" != 'Architecture: any' ]; then - echo "$architecture" >>debian/tests/control + echo "$architecture" >> $C fi - echo "" >>debian/tests/control + echo "" >> $C done -sed -i '$d' debian/tests/control +sed -i '$d' $C -- 2.30.2